package modele;

import java.util.List;
import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonWriteNullProperties;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

/**
 * <p>Pojo mapping TABLE utilisateur</p>
 * <p></p>
 *
 * <p>Generated at Sat Feb 26 23:34:05 CET 2011</p>
 * @author Salto-db Generator v1.0.16 / EJB3
 * 
 */
@Entity
@Table(name = "utilisateur")
@SuppressWarnings("serial")
public class Utilisateur implements Serializable {

	/**
	 * Attribute idUtilisateur.
	 */
	private int idUtilisateur;
	
	/**
	 * Attribute nom.
	 */
	private String nom;
	
	/**
	 * Attribute prenom.
	 */
	private String prenom;
	
	/**
	 * Attribute email.
	 */
	private String email;
	
	/**
	 * Attribute login.
	 */
	private String login;
	
	/**
	 * Attribute pw.
	 */
	private String pw;
	
	/**
	 * Attribute session.
	 */
	private String session;
	
	/**
	 * Attribute profil
	 */
	private Profil profil;	

	private int idProfil;
	/**
	 * List of Docentete
	 */
	private List<Docentete> docentetes = null;

	/**
	 * List of Docligne
	 */
	private List<Docligne> doclignes = null;

	
	/**
	 * <p> 
	 * </p>
	 * @return idUtilisateur
	 */
	@Basic
	@Id
	@GeneratedValue
	@Column(name = "id_utilisateur")
		public int getIdUtilisateur() {
		return idUtilisateur;
	}

	/**
	 * @param idUtilisateur new value for idUtilisateur 
	 */
	public void setIdUtilisateur(int idUtilisateur) {
		this.idUtilisateur = idUtilisateur;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return nom
	 */
	@Basic
	@Column(name = "nom", length = 45)
		public String getNom() {
		return nom;
	}

	/**
	 * @param nom new value for nom 
	 */
	public void setNom(String nom) {
		this.nom = nom;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return prenom
	 */
	@Basic
	@Column(name = "prenom", length = 45)
	public String getPrenom() {
		return prenom;
	}

	/**
	 * @param prenom new value for prenom 
	 */
	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return email
	 */
	@Basic
	@Column(name = "email", length = 60)
		public String getEmail() {
		return email;
	}

	/**
	 * @param email new value for email 
	 */
	public void setEmail(String email) {
		this.email = email;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return login
	 */
	@Basic
	@Column(name = "login", length = 50)
		public String getLogin() {
		return login;
	}

	/**
	 * @param login new value for login 
	 */
	public void setLogin(String login) {
		this.login = login;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return pw
	 */
	@Basic
	@Column(name = "pw", length = 100)
	public String getPw() {
		return pw;
	}

	/**
	 * @param pw new value for pw 
	 */
	public void setPw(String pw) {
		this.pw = pw;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return session
	 */
	@Basic
	@Column(name = "session", length = 60)
		public String getSession() {
		return session;
	}

	/**
	 * @param session new value for session 
	 */
	public void setSession(String session) {
		this.session = session;
	}
	
	/**
	 * get profil
	 */
	@ManyToOne(fetch=FetchType.LAZY)
	@JsonIgnore
	@JoinColumn(name = "idProfil",insertable=false ,updatable=false)
	public Profil getProfil() {
		return this.profil;
	}
	
	/**
	 * set profil
	 */
	public void setProfil(Profil profil) {
		this.profil = profil;
	}

	/**
	 * Get the list of Docentete
	 */
	 @OneToMany(mappedBy="utilisateur",fetch=FetchType.LAZY)
	 @JsonIgnore
	 public List<Docentete> getDocentetes() {
	 	return this.docentetes;
	 }
	 
	/**
	 * Set the list of Docentete
	 */
	 public void setDocentetes(List<Docentete> docentetes) {
	 	this.docentetes = docentetes;
	 }
	/**
	 * Get the list of Docligne
	 */
	 @OneToMany(mappedBy="utilisateur",fetch=FetchType.LAZY)
	 @JsonIgnore
	 public List<Docligne> getDoclignes() {
	 	return this.doclignes;
	 }
	 
	/**
	 * Set the list of Docligne
	 */
	 public void setDoclignes(List<Docligne> doclignes) {
	 	this.doclignes = doclignes;
	 }

	public void setIdProfil(int idProfil) {
		this.idProfil = idProfil;
	}

	@Basic
	@Column(name = "idProfil")
	public int getIdProfil() {
		return idProfil;
	}
}